package pc29;

import java.util.Scanner;

public class J08SungJuk {
	public static void main(String[] args) {

		// 변수선언
		String name[] = new String[4];
		int kor[] = new int[4];
		int eng[] = new int[4];
		int mat[] = new int[4];
		int tot[] = new int[4];
		double avg[] = new double[4];
		String result = "";

		Scanner sc = new Scanner(System.in);

		// 입력 및 성적처리
		for (int i = 0; i <= 3; i++) {
			System.out.println("이름은 : ");
			name[i] = sc.next();
			System.out.println("성적 입력(국영수) : ");
			kor[i] = sc.nextInt();
			eng[i] = sc.nextInt();
			mat[i] = sc.nextInt();

			tot[i] = kor[i] + eng[i] + mat[i];
			avg[i] = tot[i] / 3;
			result +="이름 : " + name[i] + "\t총점 : " + tot[i] + "\t평균 : " + avg[i] + "\n";
		}

		// 결과출력
		System.out.println(result);

	}
}
